package com.intelligentsia.gwt.client.presenter;

import com.intelligentsia.gwt.client.EventBus;
import com.intelligentsia.gwt.client.Presenter;

/**
 * <code>RootPresenter</code> class.
 * 
 * @author jguibert
 */
public class RootPresenter extends CompositePresenter<RootDisplay> {
    
    /**
     * Build a new instance of RootPresenter.
     * 
     * @param display
     *            root display instance
     * @param eventBus
     *            event bus instance
     */
    public RootPresenter(final RootDisplay display, final EventBus eventBus) {
        super(display, eventBus);
    }
    
    public void addPresenter(final Presenter... presenters) {
        for (Presenter presenter : presenters) {
            super.addPresenter("root", presenter);
        }
    }
    
    /**
     * Utility method: bind and reveal <code>RootPresenter</code>.
     */
    public void revealRoot() {
        bind();
        revealDisplay();
    }
    
}
